Repository navigation
DEV-1115 Add CI build of the library and every example - #124
Merged
Merged
Conversation
Builds on every PR into master and every push to master: assembleDebug run by name from the Gradle root, so the library and all twelve modules in settings.gradle are built, and a module added later is picked up without editing the workflow. --continue lists every broken module in one run; the run still fails if any did. A driver pin bump is now proven against the examples before it merges. Same setup as the release workflow: JDK 17 temurin, setup-gradle pinned, -Pandroid.useAndroidX=true because gradle.properties is gitignored, and the driver resolved from Shimmer-Java-Android-API's GitHub Packages with GITHUB_TOKEN or the PACKAGES_READ_TOKEN secret. Also marks gradlew executable: it was committed as 100644, so ./gradlew fails with "Permission denied" on a Linux runner. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first CI run ran out of heap (Gradle's default 512 MB) while D8 dexed the examples, and the daemon then hung until GitHub cancelled the job at 6 hours. gradle.properties is gitignored, so pass org.gradle.jvmargs on the command line, and cap the job at 30 minutes. Reproduced locally (JDK 17, Gradle 8.5): at -Xmx512m the build fails with "D8: java.lang.OutOfMemoryError: Java heap space"; at -Xmx4g it passes in 4m47s with assembleDebug run in all 12 modules. Co-Authored-By: Claude Opus 5.5 <[email protected]>
DEV-1115 Give the CI Gradle daemon 4 GB and a 30-minute timeout
There was a problem hiding this comment.
🟡 Changes recommended
The workflow risks exposing a long-lived package token and may use an incorrect PAT username.
2 open issues
What changed in this PR
Adds GitHub Actions CI to build the Android library and examples, and marks the Gradle wrapper executable.
Changes:
- Adds PR and
masterpush CI. - Configures Java 17, Gradle, AndroidX, and package authentication.
- Enables building all modules with
assembleDebug --continue. - Marks
gradlewexecutable.
Review findings:
- Critical:
PACKAGES_READ_TOKENmay be exposed to untrusted pull-request code. - Moderate: PAT authentication may fail because the username remains
github.actor.
| File | Summary |
|---|---|
ShimmerAndroidInstrumentDriver/gradlew |
Provides the executable Gradle wrapper script. |
.github/workflows/ci.yml |
Defines Android CI and package authentication. |
Review effort: Lite
Drops the PACKAGES_READ_TOKEN fallback. PR builds run the PR's own Gradle scripts, so a long-lived token in their environment could be read by them, and a PAT would also need its owner's username rather than github.actor. Neither secret exists and the PR build passes with GITHUB_TOKEN alone. If that is ever refused, the fix is to grant this repo read access on the package, not to add a token. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The job holds a packages: read GITHUB_TOKEN, so a moved tag should not be able to change what runs with it. Same form as setup-gradle; both SHAs are the commits v4 points at today, so the build itself is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
JongChern
added a commit
that referenced
this pull request
Oct 18, 2026
Three follow-ups ahead of review: - The release build job now also builds every example app against the driver this release ships with, before anything is published. ci.yml only ever builds them against master's default driver, so a release that picks a newer driver was never built with the examples (raised in #126). Both build steps pass the 4 GB daemon heap from #125. - The publishing block accepts gpr.usr as well as gpr.user, since the root build.gradle reads gpr.usr (also raised in #126). - actions/* steps are pinned to commit SHAs, matching #124: each is the commit its v4 tag points at today. Co-Authored-By: Claude Opus 5.5 <[email protected]>
MAzalya
approved these changes
Oct 19, 2026
MAzalya
left a comment
Contributor
There was a problem hiding this comment.
Approved. CI is green, the pinned SHAs match their tags, and the build now uses GITHUB_TOKEN only.
Non-blocking nit: actions/checkout here doesn't set persist-credentials: false as #123 and the Java release workflow do. The token is read-only, so the risk is low, but it would be consistent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What
Adds
.github/workflows/ci.yml, the repo's first CI. It runs on every PR intomasterand every push tomaster.It runs
./gradlew assembleDebug --continue -Pandroid.useAndroidX=truefromShimmerAndroidInstrumentDriver/. Because the task is selected by name from the Gradle root, this builds the library and all twelve modules insettings.gradle, and a module added later is picked up without editing the workflow.--continuelists every broken module in one run; the run still fails if any did.This means a
shimmerdriver/shimmerbluetoothmanagerpin bump is proven against the examples before it merges (DEV-1115).Setup:
-Pandroid.useAndroidX=trueon the command line, becausegradle.propertiesis gitignored.Driver authentication
The driver is resolved from Shimmer-Java-Android-API's GitHub Packages with this repo's
GITHUB_TOKENonly (packages: read). No long-lived token is used, because PR builds run the PR's own Gradle scripts, which could read one. If resolution is ever refused (401/403 oncom.shimmerresearch:shimmerdriver), grant this repo read access in that package's "Manage Actions access" settings rather than adding a token.Also:
gradlewmarked executableShimmerAndroidInstrumentDriver/gradlewwas committed as100644, so./gradlewfails with "Permission denied" on a Linux runner. This PR sets it to100755. The release workflow needs the same change, so merge this first or apply it there too.Verified
GITHUB_TOKENalone.assembleDebug --dry-runselects exactly the 12:<module>:assembleDebugtasks insettings.gradle.preBuildmade to throw,./gradlew preBuild --continueexited 1 and the other 11 modules still ran.Notes
masterhas no required status checks yet. Once this merges, a repo admin can make "Build library and examples" required.shimmerBasicExamplebuilds against the publishedshimmerandroidinstrumentdriver:3.2.8_betaaar, not the in-tree library. It still proves the driver pin, which every module gets from the rootbuild.gradle.🤖 Generated with Claude Code